<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning" align="center"><?php echo $error_warning; ?></div>
  <?php } ?>
  <?php if ($success) { ?>
  <div class="success" align="center"><?php echo $success; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/information.png" alt="" /> <?php echo $heading_title; ?></h1>
      <div class="buttons"><a onclick="location = '<?php echo $insert; ?>'" class="button"><span><?php echo $button_insert; ?></span></a><a onclick="$('form').submit();" class="button"><span><?php echo $button_delete; ?></span></a></div>
    </div>
    <div class="content">
      <form action="<?php echo $delete; ?>" method="post" enctype="multipart/form-data" id="form">
        <table class="list">
          <thead>
            <tr>
              <td width="1" style="text-align: center;"><input type="checkbox" onclick="$('input[name*=\'selected\']').attr('checked', this.checked);" /></td>
			  <td class="center" width="100"><?php echo $column_sort_order; ?>
              <!-- start  dunglt -->
              <a onclick="$('form').attr('action','<?php echo $updateorder; ?>');$('form').submit();" class="button"><span><?php echo $button_save; ?></span></a>
              <a href="<?php echo $sort_sort_order; ?>" class="<?php echo strtolower($order); ?>"></a>
              <!-- end  dunglt -->
              </td>
			   <td class="center" width="100"><?php echo $column_image; ?></td>
              <td class="left"><?php if ($sort == 'id.title') { ?>
                <a href="<?php echo $sort_title; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_title; ?></a>
                <?php } else { ?>
                <a href="<?php echo $sort_title; ?>"><?php echo $column_title; ?></a>
                <?php } ?></td>
				<td class="center" width="200" style="display:none">Nick Yahoo</td>
              <td class="center" width="100"><?php echo $entry_status2; ?></td>
              <td class="right" width="100"><?php echo $column_action; ?></td>
            </tr>
          </thead>
          <tbody>
            <?php if ($informations) { ?>
            <?php foreach ($informations as $information) { ?>
            <tr>
              <td style="text-align: center;"><?php if ($information['selected']) { ?>
                <!-- start  dunglt -->
                <input type="checkbox" id="selected_<?php echo $information['information_id']; ?>" name="selected[]" value="<?php echo $information['information_id']; ?>" checked="checked" />
                 <!-- end  dunglt -->
                <?php } else { ?>
                 <!-- start  dunglt -->
                <input type="checkbox" id="selected_<?php echo $information['information_id']; ?>" name="selected[]" value="<?php echo $information['information_id']; ?>" />
                 <!-- end  dunglt -->
                <?php } ?></td>
				 <td class="center">
                 <!-- start  dunglt -->
                 <input type="hidden" name="list_information_id[]" value="<?php echo $information['information_id']; ?>"  />
                 <input size="3" style="text-align:center;" type="text" name="sort_order[]" value="<?php echo $information['sort_order']; ?>"  />
                 <!-- end  dunglt -->
                 </td>
				 <td class="center"><img src="<?php echo $information['image']; ?>" alt="<?php echo $information['title']; ?>" style="padding: 1px; border: 1px solid #DDDDDD;" /></td>
              <td class="left"><?php echo $information['title']; ?></td>
              <td class="center" style="display:none"><?php echo $information['nick_chat']; ?></td>
			  <td class="center">
              <!-- start  dunglt -->
              <?php if($information['status']==1) { 
              ?>
              <a onclick="$('#selected_<?php echo $information['information_id']; ?>').attr('checked','checked'); $('form').attr('action','<?php echo $updatestatus; ?>');$('form').submit();"><img src="view/image/success.png" alt="" /></a>
              <?php
              } else {
              ?>
              <a onclick="$('#selected_<?php echo $information['information_id']; ?>').attr('checked','checked'); $('form').attr('action','<?php echo $updatestatus; ?>');$('form').submit();"><img src="view/image/warning.png" alt="" /></a>
              <?php
              } ?>
              <!-- end dunglt -->
              </td>
              <td class="right"><?php foreach ($information['action'] as $action) { ?>
                [ <a href="<?php echo $action['href']; ?>"><?php echo $action['text']; ?></a> ]
                <?php } ?></td>
            </tr>
            <?php } ?>
            <?php } else { ?>
            <tr>
              <td class="center" colspan="6"><?php echo $text_no_results; ?></td>
            </tr>
            <?php } ?>
          </tbody>
        </table>
        <!-- start  dunglt -->
        <input type="hidden" name="module" value="<?php echo $module; ?>" />
        <!-- end dunglt -->
      </form>
     <?php
    if ((int)$information_total > 20) {
     ?>
    <div class="pagination"><?php echo $pagination; ?></div>
    <?php
    }
    ?>
    </div>
  </div>
</div>
<?php echo $footer; ?>